home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1995 August
/
CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso
/
disc2
/
demo
/
pwrtcp11.exe
/
POWERTCP.HP_
/
POWERTCP.bin
Wrap
Text File
|
1995-02-05
|
2KB
|
55 lines
//***************************************************************************
//
// Module: PowerTcp.hpp
//
// Purpose:
// Declares CPowerTcp class
//
//***************************************************************************
//
// Written by Dart Communication Application Programming Group.
// Copyright (c) 1994 Dart Communications. All Rights Reserved.
//
//***************************************************************************
// PowerTCP.h should be included before this file
// typedefs used here...
// Classes used...
class CTcp;
//
// CPowerTcp
// Defines the functions required to provide a TCP stream to parent
//
class CPowerTcp
{
friend class CTcp;
private:
CTcp &Tcp; // WINSOCK calls, etc here
protected:
// assessor functions from Tcp follow...
virtual void ConnectEvent (LPCSTR RemoteDotAddr, WORD RemotePort,
LPCSTR LocalDotAddr, WORD LocalPort, LPCSTR LocalName);
virtual void RecvEvent (LPVOID Data, size_t ByteCnt);
virtual void SendEvent (DWORD DataTag);
virtual void ListenEvent (LPCSTR LocalDotAddr, WORD LocalPort, LPCSTR LocalName);
virtual void AcceptEvent (void);
virtual void ExceptionEvent(PT_EXCEPTION ErrorCode, LPCSTR ErrorDesc)=0;
virtual PT_TYPE GetType (void);
public:
BOOL Connect (LPCSTR OemLicense, PT_FLAGS Flags, LPCSTR RemoteHost, WORD RemotePort,
LPCSTR LocalDotAddr, WORD LocalPort);
BOOL Accept (LPCSTR Key, PT_FLAGS Flags, CPowerTcp &Daemon);
BOOL Send (LPVOID Data, size_t ByteCnt, BOOL Urgent, DWORD DataTag);
BOOL Recv (size_t MaxByteCnt);
BOOL Listen (LPCSTR OemLicense, PT_FLAGS Flags, LPCSTR LocalDotAddr, WORD LocalPort, WORD Timeout=0);
BOOL Close (BOOL Abort);
PT_STATE State (void);
CPowerTcp (HINSTANCE);
~CPowerTcp (void);
int operator = (CPowerTcp &);
};